/*
 * @Author: SimonCK666 SimonYang223@163.com
 * @Date: 2022-05-06 17:01:42
 * @LastEditors: SimonCK666 SimonYang223@163.com
 * @LastEditTime: 2022-05-06 17:04:59
 * @FilePath: \golang-concept\L3_gomap\map.go
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package main

import "fmt"

// map 就是 py 中的 dict

func main() {
	// 使用 make 定义
	m1 := make(map[string]string)
	m1["name"] = "Simon"
	m1["age"] = "21"
	fmt.Println("m1: ", m1)

	// 使用 map 关键字来进行定义
	m2 := map[string]string {
		"name": "Simon",
		"age": "21",
		"email": "SimonYang223@163.com",
	}
	fmt.Println("m2", m2)

	for key, val := range m2 {
		fmt.Println(key, val)
	}
}
